.\"   $Id: addrdsins.3,v 1.1 2002/03/13 13:37:37 fred Exp $
.\" @(#)addrdsins.1 1.11 93/08/18 ; Labo masi cao-vlsi
.if t \{\
.so man1/alc_contents.mac
.XS \n%
.ti 0.2i
addrdsins
.XE
.XS0 \n%
.ti 0.2i
addrdsins
.XE0 \}
.TH ADDRDSINS 3 "October 1, 1997" "ASIM/LIP6" "RDS PHYSICAL FUNCTIONS"
.SH NAME
 addrdsins \- adds an instance to a figure
.so man1/alc_origin.1
.SH SYNOPSIS
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "rdsnnn.h"
rdsins_list \(**addrdsins( Figure, Model, Name, Sym, X, Y )
     rdsfig_list \(**Figure;
     char        \(**Model;
     char        \(**Name;
     char         Sym;
     long         X;
     long         Y;
.ft R
.fi
.SH PARAMETER
.TP 20
\fIFigure\fP
figure which contains the instance.
.TP
\fIModel\fP
Name of the model of the instance. 
.TP
\fIName\fP
Name of the instance in the figure at which it belongs.
.TP
\fISym\fP
Symmetry applied to the instance. 
.RS
.TP 20
possible values :
.TP
\fBRDS_NOSYM\fP
no symmetry.
.TP
\fBRDS_ROT_P\fP
90 degrees rotation counter clockwise.
.TP
\fBRDS_SYMXY\fP
symmetry with regard to a horizontal and vertical axis.
.TP
\fBRDS_ROT_M\fP
90 degrees rotation clockwise.
.TP
\fBRDS_SYM_X\fP
symmetry with regard to a vertical axis.
.TP
\fBRDS_SY_RM\fP
symmetry with regard to a vertical axis and 90 degrees clockwise.
.TP
\fBRDS_SYM_Y\fP
symmetry with regard to a horizontal axis.
.TP
\fBRDS_SY_RP\fP
symmetry with regard to a horizontal axis and 90 degrees rotation counter clockwise.
.RE
.TP
\fIX,Y\fP
position of the lower left corner of the instance in the figure after symmetry.
.SH DESCRIPTION
The \fIaddrdsins\fP function adds an instance to the head of instances's list in the figure
described in function parameter. Some fields of rdsins_list structure
are modified as follows :
.br               
The field \fIFIGNAME\fP is set to \fBModel\fP
.br
The field \fIINSNAME\fP is set to \fBName\fP
.br
The field \fIX\fP is set to \fBX\fP
.br
The field \fIY\fP is set to \fBY\fP 
.br
The field \fITRANSF\fP is set to \fBSym\fP
.br
The field \fISIZE\fP is set to \fBFigure->SIZE\fP
.SH RETURN VALUE
\fBaddrdsins\fP returns a pointer to the newly created instance which is head of instances's list of the figure.
.SH ERRORS
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
"Rds202: rdsalloc error, can't continue !"
.ft R
.RS
it's impossible to allocate the memory size desired.
.SH EXAMPLE
.ta 3n 6n 9n 12n 15n 18n 21n
.nf
.if n \{\
.ft B \}
.if t \{\
.ft CR \}
#include "mutnnn.h"
#include "rdsnnn.h"
#include "rtlnnn.h"
        typedef struct UserStruct
         {
           char \(**STRING;
           void \(**USER1;
         } UserStruct;
         main()
          {
            rdsfig_list \(**RdsFigure;
            rdsins_list \(**Instance;
            mbkenv();
            rdsenv();
            loadrdsparam();
            RdsFigure = addrdsfig ("core",sizeof ( UserStruct ) );
            Instance = \fBaddrdsins\fP (RdsFigure,"na2_y","and2",RDS_NOSYM,8,6); 
            printf("(RdsFigure->INSTANCE)->NAME = %s\\n",
                    (RdsFigure->INSTANCE)->NAME);
            /\(** Instance is head of instance list of the figure \(**/
            printf("Instance->NAME = %s\\n", Instance->NAME);
          }
.ft R
.fi
.SH SEE ALSO
.BR librds,
.BR delrdsins,
.BR viewrdsins


.so man1/alc_bug_report.1

